package ${package.ServiceImpl};

import ${package.Entity}.${entity};
import ${package.Mapper}.${table.mapperName};
import ${package.Service}.${table.serviceName};
import ${superServiceImplClassPackage};
import org.springframework.stereotype.Service;
<#if enableQuery>
import ${pojoPackage}.${pojoQueryName};
</#if>
import java.util.List;


<#--导入@RequiredArgsConstructor-->
<#if lombok>
import lombok.RequiredArgsConstructor;
</#if>

/**
 * <p>
 * ${table.comment!} 服务实现类
 * </p>
 *
 * @author ${author}
 * @since ${date}
 */
@Service
<#--导入@RequiredArgsConstructor-->
<#if lombok>
@RequiredArgsConstructor
</#if>
<#if kotlin>
open class ${table.serviceImplName} : ${superServiceImplClass}<${table.mapperName}, ${entity}>(), ${table.serviceName} {

}
<#else>
public class ${table.serviceImplName} extends ${superServiceImplClass}<${table.mapperName}, ${entity}> implements ${table.serviceName} {
<#--注入服务类，使用了Lombok 通过构造函数注入，没有则使用@Resource-->
 <#if lombok>

   private final  ${table.mapperName} ${table.mapperName?uncap_first};
 <#else>

   @Resource
   ${table.mapperName} ${table.mapperName?uncap_first};
 </#if>

   @Override
   public List<${entity}> selectList(<#if enableQuery>${pojoQueryName}<#else>${entity}</#if> query</#if>){
      return ${table.mapperName?uncap_first}.selectList(query);
 }
}

